package com.example.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.to.kill.SecKillOrderTo;
import com.example.common.utils.PageUtils;
import com.example.common.entity.order.OrderEntity;
import com.example.common.vo.order.OrderSubmitVo;
import com.example.common.vo.order.PayAsyncVo;
import com.example.common.vo.order.PayVo;
import org.springframework.ui.Model;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 订单
 *
 * @author zyred
 * @email zyred@163.com
 * @date 2021-08-23 11:54:53
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    String confirmOrder(Model model);

    String submitOrder(OrderSubmitVo vo, Model model, RedirectAttributes attributes);

    OrderEntity getOrderStatus(String orderSn);

    void releaseOrder(OrderEntity order);

    PayVo getPay(String orderSn);

    String aliAsyncNotify(PayAsyncVo vo, HttpServletRequest request);

    PageUtils listWithItem(Map<String, Object> params);

    void createSecKillOrder(SecKillOrderTo to);
}

